<!DOCTYPE html>
<html>
<head>
	<title>条件运算符</title>
	<meta charset="utf-8">
	<script type="text/javascript">
	var voteable;
	var age = 20;
	voteable=(age<18)?"年龄太小":"年龄已达到";
	console.log(voteable);


	</script>
</head>
<body>

</body>
</html>